home *** CD-ROM | disk | FTP | other *** search
Makefile | 1992-11-16 | 3.3 KB | 132 lines | [TEXT/MPS ] |
- INITOBJECTS = init.c.o ∂
- ShowINIT.a.o
-
-
- CDEVOBJECTS = cdev.cp.o
-
- # DriverGlue must be first for linker.
-
- DRVROBJECTS = DriverGlue.a.o ∂
- drvr.c.o ∂
- drvr.a.o
-
-
- DUMPOBJECTS = DumpTracks.c.o
-
-
- # Specify any options you want to pass to the compiler(s). -b tells the compiler to
- # put strings in with the current segment, and not in the global data segment.
-
- CPlusOptions = -b -mf
- COptions = -r -b
-
- #
- # Finally, the entire file consists of the DRVR, the INIT, and the CDEV.
- # These are included by tracks.r, which simply includes the aforementioned resources...
- #
-
-
-
- Tracks ƒƒ makefile Init.rsrc drvr.rsrc cdev.rsrc dumptracks
- rez Tracks.r -o Tracks
- SetFile Tracks -c BNNY -t cdev -a B
- duplicate Tracks "{systemfolder}control panels:"Tracks -y
-
-
-
- #
- ##################### Compile the CDEV #####################
- #
-
- cdev.cp.o ƒ makefile ∂
- cdev.cp ∂
- cdev.h ∂
- Tracks.h ∂
- TraceModule.h ∂
- TracksSaveLoad.h
-
- #
- CPlus {CPlusOptions} cdev.cp -o cdev.cp.o
-
-
- #
- ##################### Compile the INIT #####################
- #
- ShowINIT.a.o ƒ ShowINIT.a makefile
- asm ShowINIT.a -o ShowINIT.a.o
- init.c.o ƒ init.c TracksSaveLoad.h TraceModule.h
- C {COptions} init.c -o init.c.o
-
-
-
-
- #
- ##################### Compile the DRVR #####################
- #
-
- drvr.c.o ƒ makefile ∂
- drvr.c ∂
- TraceModule.h ∂
- Tracks.h
- C {COptions} drvr.c -o drvr.c.o
-
- # Compile the assembly glue object. Usual dependencies
- DriverGlue.a.o ƒ DriverGlue.a DriverGlue.incl.a
- asm -case obj DriverGlue.a
-
- #
- #
- # Link everything for the driver together. -rt specifies the resource type.
- # In this case, it's 'DRVR' with an ID of 0. -m specifies which routine in the
- # object files is the first one, so we tell it to look for the first one in the
- # assembly file. -sn renames the main segment to ".TimDriver". -ra is pretty
- # self-explanatory, except you have to specify which segment(s) get the resource
- # attributes. Note the only library I needed for this entire thing was Interface.o.
- #
- drvr.rsrc ƒƒ makefile {DRVROBJECTS}
- Link -sg .TRACE -rt DRVR=0 -m HEADERDEF -c 'RSED' -t 'rsrc' ∂
- -ra ".TRACE"=resSysHeap,resLocked,resPreLoad ∂
- {DRVROBJECTS} ∂
- "{Libraries}Interface.o" ∂
- -o drvr.rsrc
-
- #
- # Link everything for the INIT together. Not much here. Much of the same options get
- # passed to the INIT linking as to the DRVR linking. Again, only Interface.o needed.
-
- Init.rsrc ƒƒ makefile {INITOBJECTS} init.r init.h
- Link -rt INIT=1 -m INITMAIN -sg INITMAIN -sn "Main=Install Tracks" ∂
- -c 'RSED' -t 'rsrc' ∂
- -ra InitSeg=resSysHeap,resLocked,resPreLoad ∂
- {INITOBJECTS} ∂
- "{Libraries}"Interface.o ∂
- -o Init.rsrc
- rez init.r -a -o init.rsrc
-
- #
- # Link everything for the CDEV together.
- #
- cdev.rsrc ƒƒ makefile {CDEVOBJECTS} cdev.r cdev.h
- Link -m CDEVMAIN -rt cdev=-4064 -c 'RSED' -t 'rsrc' ∂
- -ra InitSeg=resSysHeap,resLocked,resPreLoad ∂
- {CDEVOBJECTS} ∂
- "{Libraries}"Interface.o ∂
- #"{Libraries}Runtime.o" ∂
- -o cdev.rsrc
- rez cdev.r -a -o cdev.rsrc
- #
- # Dumptracks: The MPW Tool used to view Tracks Data
- #
- dumptracks ƒƒ makefile {DUMPOBJECTS} dumptracks.h
- Link -d -c 'MPS ' -t MPST ∂
- {DUMPOBJECTS} ∂
- "{CLibraries}"StdClib.o ∂
- "{Libraries}"Stubs.o ∂
- "{Libraries}"Runtime.o ∂
- "{Libraries}"Interface.o ∂
- -o DumpTracks
- duplicate DumpTracks {MPW}Tools:DumpTracks -y
-
- dumptracks.c.o ƒ makefile dumptracks.c
- C -r dumptracks.c
-